﻿
// Author:					Joe Audette
// Created:					2010-4-20
// Last Modified:			2010-4-20
// 
// The use and distribution terms for this software are covered by the 
// Common Public License 1.0 (http://opensource.org/licenses/cpl.php)  
// which can be found in the file CPL.TXT at the root of this distribution.
// By using this software in any fashion, you are agreeing to be bound by 
// the terms of this license.
//
// You must not remove this notice, or any other, from this software.

using System;
using System.IO;
using System.Text;
using System.Data;
using System.Data.Common;
using System.Data.SqlClient;
using System.Configuration;

namespace LiveSSOForDotNet.Data
{

    public class DB_Users
    {
        DataHelper helper;
        public DB_Users()
        {
            helper = new DataHelper();
        }

        //add Friends
        public bool InsertUsers(string userID, string email, string windowsLiveID)
        {
            SqlParameter[] paramlist =
            {
                helper.CreateParameter("@UserID",userID),
                helper.CreateParameter("@Email",email),
                helper.CreateParameter("@WindowsLiveID",windowsLiveID)     
            };
            return helper.ExecuteNonQuery("InsertUsers", paramlist) == 2;
        }

        public DataSet SelectUserByWindowsLiveID(string windowsLiveID)
        {
            return helper.ExecuteDataSet("SelectUserByWindowsLiveID", helper.CreateParameter("@WindowsLiveID", windowsLiveID));
        }
        

    }
    
}


